<template>
  <el-container style=" border: 1px solid #eee">
    <el-aside width="auto" style="background-color: rgb(238, 241, 246) ;margin-left: -1px;">
      <Aside :isCollapse="isCollapse" ></Aside>
    </el-aside>

    <el-container style="height: 100vh;">
      <el-header style="text-align: right; font-size: 12px; border-bottom: darkgray 1px solid"  >
        <Header @doCollapse="doCollapse" :icon="icon"></Header>
      </el-header>

      <el-main style="">
<!--        <Main style=""></Main>-->
        <router-view></router-view>
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
import Aside from "./index/Aside";
import Header from "./index/Header";
// import Main from "@/components/index/Main";
export default {
  name: "Index",
  components:{
    Aside,Header
  },
  data() {
    return{
        isCollapse:false,
        icon:'el-icon-s-fold',
    }
  },
  created() {
  },
  methods:{
    doCollapse(){
      if (this.isCollapse==true){
        this.isCollapse=false
        this.icon = 'el-icon-s-fold'
      }else {
        this.isCollapse=true
        this.icon = 'el-icon-s-unfold'
      }
    },
  }
}
</script>

<style scoped>
  .el-header {
    /*background-color: #B3C0D1;*/
    color: #333;
    line-height: 60px;
  }
  .el-card__body, .el-main {
    padding: 20px;
    padding-bottom: 0px;
  }
  .el-aside {
    color: #333;

  }
</style>